Skip to content

Change targetApi to 35 #9051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Jul 17, 2025
Merged

Change targetApi to 35 #9051

merged 25 commits into from
Jul 17, 2025

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Jul 8, 2025

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Change the targetSdk to 35.
Also update the gradle plugin and the lint version.
Some enforcement has been done to check for permission.
Also edgeToEdge is enabled by default now.
Reviewer should test carefully the screens on various devices. Probably good to let this code on the nightly / open testing for an extra days.

Motivation and context

Be able to publish the application on the PlayStore in september 2025.

Closes #9049

Screenshots / GIFs

Tests

  • Smoke test, the screens should render correctly on all OS versions

Tested devices

  • Physical API 35
  • Emulator API 30
  • OS version(s):

Checklist

bmarty added 7 commits July 7, 2025 17:30
./gradlew wrapper --gradle-version 8.14.3  --gradle-distribution-sha256-sum bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531
./gradlew wrapper --gradle-version 8.14.3  --gradle-distribution-sha256-sum bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531
Copy link

sonarqubecloud bot commented Jul 8, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@ElementBot
Copy link

ElementBot commented Jul 11, 2025

Warnings
⚠️

gradle.properties#L45 - Newer version of lint available: 8.12.0-alpha09

⚠️

gradle.properties#L45 - Newer version of lint available: 8.12.0-alpha09

⚠️

library/attachment-viewer/src/main/java/im/vector/lib/attachmentviewer/AttachmentViewerActivity.kt#L114 - Custom view FrameLayout has setOnTouchListener called on it but does not override performClick

⚠️

library/attachment-viewer/src/main/java/im/vector/lib/attachmentviewer/AttachmentViewerActivity.kt#L114 - Custom view FrameLayout has setOnTouchListener called on it but does not override performClick

⚠️

vector/src/main/AndroidManifest.xml#L16 - READ_EXTERNAL_STORAGE is deprecated (and is not granted) when targeting Android 13+. If you need to query or interact with MediaStore or media files on the shared storage, you should instead use one or more new storage permissions: READ_MEDIA_IMAGES, READ_MEDIA_VIDEO or READ_MEDIA_AUDIO.

⚠️

vector/src/main/AndroidManifest.xml#L16 - READ_EXTERNAL_STORAGE is deprecated (and is not granted) when targeting Android 13+. If you need to query or interact with MediaStore or media files on the shared storage, you should instead use one or more new storage permissions: READ_MEDIA_IMAGES, READ_MEDIA_VIDEO or READ_MEDIA_AUDIO.

⚠️

vector/src/main/AndroidManifest.xml#L185 - This intent filter has the format of an Android App Link but is missing the autoVerify attribute; add android:autoVerify="true" to ensure your domain will be validated and enable App Link-related Lint warnings. If you do not want clicked URLs to bring the user to your app, remove the android.intent.category.BROWSABLE category, or set android:autoVerify="false" to make it clear this is not intended to be an Android App Link.

⚠️

vector/src/main/AndroidManifest.xml#L185 - This intent filter has the format of an Android App Link but is missing the autoVerify attribute; add android:autoVerify="true" to ensure your domain will be validated and enable App Link-related Lint warnings. If you do not want clicked URLs to bring the user to your app, remove the android.intent.category.BROWSABLE category, or set android:autoVerify="false" to make it clear this is not intended to be an Android App Link.

⚠️

vector/src/main/AndroidManifest.xml#L194 - Attribute autoVerify is only used in API level 23 and higher (current min is 21)

⚠️

vector/src/main/AndroidManifest.xml#L194 - Attribute autoVerify is only used in API level 23 and higher (current min is 21)

⚠️

vector/src/main/AndroidManifest.xml#L209 - Attribute autoVerify is only used in API level 23 and higher (current min is 21)

⚠️

vector/src/main/AndroidManifest.xml#L209 - Attribute autoVerify is only used in API level 23 and higher (current min is 21)

⚠️

vector/src/main/AndroidManifest.xml#L239 - Consider splitting data tag into multiple tags with individual attributes to avoid confusion

⚠️

vector/src/main/AndroidManifest.xml#L239 - Consider splitting data tag into multiple tags with individual attributes to avoid confusion

⚠️

vector/src/main/AndroidManifest.xml#L242 - Consider splitting data tag into multiple tags with individual attributes to avoid confusion

⚠️

vector/src/main/AndroidManifest.xml#L242 - Consider splitting data tag into multiple tags with individual attributes to avoid confusion

⚠️

vector/src/main/AndroidManifest.xml#L296 - Expecting android:screenOrientation="unspecified" or "fullSensor" for this activity so the user can use the application in any orientation and provide a great experience on Chrome OS devices

⚠️

vector/src/main/AndroidManifest.xml#L296 - Expecting android:screenOrientation="unspecified" or "fullSensor" for this activity so the user can use the application in any orientation and provide a great experience on Chrome OS devices

⚠️

vector/src/main/AndroidManifest.xml#L296 - Fixed screen orientations will be ignored in most cases, starting from Android 16. Android is moving toward a model where apps are expected to adapt to various orientations, display sizes, and aspect ratios.

⚠️

vector/src/main/AndroidManifest.xml#L296 - Fixed screen orientations will be ignored in most cases, starting from Android 16. Android is moving toward a model where apps are expected to adapt to various orientations, display sizes, and aspect ratios.

⚠️

vector/src/main/AndroidManifest.xml#L305 - Attribute supportsPictureInPicture is only used in API level 24 and higher (current min is 21)

⚠️

vector/src/main/AndroidManifest.xml#L305 - Attribute supportsPictureInPicture is only used in API level 24 and higher (current min is 21)

⚠️

vector/src/main/AndroidManifest.xml#L312 - Attribute supportsPictureInPicture is only used in API level 24 and higher (current min is 21)

⚠️

vector/src/main/AndroidManifest.xml#L312 - Attribute supportsPictureInPicture is only used in API level 24 and higher (current min is 21)

⚠️

vector/src/main/AndroidManifest.xml#L318 - Attribute supportsPictureInPicture is only used in API level 24 and higher (current min is 21)

⚠️

vector/src/main/AndroidManifest.xml#L318 - Attribute supportsPictureInPicture is only used in API level 24 and higher (current min is 21)

⚠️

vector/src/main/AndroidManifest.xml#L447 - Exported receiver does not require permission

⚠️

vector/src/main/AndroidManifest.xml#L447 - Exported receiver does not require permission

⚠️

vector/src/main/java/im/vector/app/features/notifications/NotificationUtils.kt#L1072 - Use the KTX function createBitmap instead?

⚠️

vector/src/main/java/im/vector/app/features/notifications/NotificationUtils.kt#L1072 - Use the KTX function createBitmap instead?

⚠️

vector/src/main/java/im/vector/app/features/webview/VectorWebViewActivity.kt#L46 - Using setJavaScriptEnabled can introduce XSS vulnerabilities into your application, review carefully

⚠️

vector/src/main/java/im/vector/app/features/webview/VectorWebViewActivity.kt#L46 - Using setJavaScriptEnabled can introduce XSS vulnerabilities into your application, review carefully

⚠️

vector/src/main/res/layout/activity_call.xml#L10 - Possible overdraw: Root element paints background @color/bg_call_screen_blur with a theme that also paints a background (inferred theme is @android:style/Theme.Holo)

⚠️

vector/src/main/res/layout/activity_call.xml#L10 - Possible overdraw: Root element paints background @color/bg_call_screen_blur with a theme that also paints a background (inferred theme is @android:style/Theme.Holo)

⚠️

vector/src/main/res/layout/activity_progress.xml#L6 - Possible overdraw: Root element paints background ?vctr_waiting_background_color with a theme that also paints a background (inferred theme is @android:style/Theme.Holo)

⚠️

vector/src/main/res/layout/activity_progress.xml#L6 - Possible overdraw: Root element paints background ?vctr_waiting_background_color with a theme that also paints a background (inferred theme is @android:style/Theme.Holo)

⚠️

vector/src/main/res/layout/fragment_generic_recycler.xml#L8 - Possible overdraw: Root element paints background ?android:colorBackground with a theme that also paints a background (inferred theme is @android:style/Theme.Holo)

⚠️

vector/src/main/res/layout/fragment_generic_recycler.xml#L8 - Possible overdraw: Root element paints background ?android:colorBackground with a theme that also paints a background (inferred theme is @android:style/Theme.Holo)

Generated by 🚫 dangerJS against f421ead

@bmarty bmarty force-pushed the feature/bma/target35 branch from 83cf66c to 3f22ddb Compare July 16, 2025 09:49
@bmarty bmarty marked this pull request as ready for review July 16, 2025 14:12
Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

window.setDecorFitsSystemWindows(false)
// New API instead of SYSTEM_UI_FLAG_IMMERSIVE
window.decorView.windowInsetsController?.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
// New API instead of FLAG_TRANSLUCENT_STATUS
@Suppress("DEPRECATION")
window.statusBarColor = ContextCompat.getColor(this, R.color.half_transparent_status_bar)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point we should move these colors to enableEdgeToEdge I think. We can probably wait until it's mandatory though.

@bmarty bmarty merged commit ee64466 into develop Jul 17, 2025
12 of 16 checks passed
@bmarty bmarty deleted the feature/bma/target35 branch July 17, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Target SDK 35.
3 participants